package com.dindang.propertyfee.di.module;

import com.dindang.propertyfee.mvp.contract.PropertyFeeContract;
import com.dindang.propertyfee.mvp.model.PropertyFeeModel;
import com.jess.arms.di.scope.FragmentScope;

import dagger.Module;
import dagger.Provides;


@Module
public class PropertyFeeModule {
    private PropertyFeeContract.View view;

    /**
     * 构建PropertyFeeModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public PropertyFeeModule(PropertyFeeContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    PropertyFeeContract.View providePropertyFeeView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    PropertyFeeContract.Model providePropertyFeeModel(PropertyFeeModel model) {
        return model;
    }
}